package yingyong

import "fmt"

func Ticket() {
	var kind string
	fmt.Println("请输入类型")
	fmt.Scanln(&kind)
	var date string
	fmt.Println("请输入日期")
	fmt.Scanln(&date)
	var time string
	fmt.Println("请输入时间")
	fmt.Scanln(&time)
	totalNum, page, price := searchticket(kind, date, time)
	fmt.Println(totalNum, page, price)

}

func searchticket(kind string, date string, time string) (totalNum int, page string, price string) {

	switch kind {
	case "火车":
		totalNum = 10
		page = "1/12页"
		price = "58~68元"
	case "动车":
		totalNum = 12
		page = "1/13页"
		price = "98~118元"
	case "高铁":
		totalNum = 15
		page = "1/20页"
		price = "98~128元"

	}

	return
}
